home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Storage / DragPriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.5 KB  |  134 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DragPriv.cpp
  3.  
  4.     Contains:    Definition of Private classes for ODDragAndDrop.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     3/15/96    DH        1287259 - 1.0.2 Don't get back what I put
  13.                                     in the scrapbook. Changed ODMemContainer so
  14.                                     that it has a constructor that makes a new
  15.                                     container given a container handle.
  16.          <7>      9/6/95    VL        1274572: Added GetFinderInfo and
  17.                                     GetIconFamilyFromFile.
  18.          <6>     5/25/95    jpa        List.h --> LinkList.h [1253324]
  19.          <5>    12/13/94    VL        1203627,1200603,1203451,1198037,1194537,119
  20.                                     4755,1186815: Bug fixes.
  21.          <4>     9/29/94    RA        1189812: Mods for 68K build.
  22.          <3>     9/23/94    VL        1184272: ContainerID is now a sequence of
  23.                                     octets.
  24.          <2>     7/26/94    VL        Got rid of dependency on Bento Container
  25.                                     Suite.
  26.          <1>     7/21/94    VL        first checked in
  27.  
  28.     To Do:
  29.     In Progress:
  30. */
  31.  
  32. #ifndef _DRAGPRIV_
  33. #define _DRAGPRIV_
  34.  
  35. #ifndef _ODTYPES_
  36. #include <ODTypes.h>
  37. #endif
  38.  
  39. #ifndef _ODMEMORY_
  40. #include <ODMemory.h>
  41. #endif
  42.  
  43. #ifndef _PLFMDEF_
  44. #include <PlfmDef.h>
  45. #endif
  46.  
  47. #ifndef _LINKLIST_
  48. #include <LinkList.h>
  49. #endif
  50.  
  51. //==============================================================================
  52. // Forward declaration
  53. //==============================================================================
  54.  
  55. class    ODStorageSystem;
  56. class    ODContainer;
  57. class    ODDocument;
  58. class    ODDraft;
  59. class    PlatformFile;
  60. class    ODStorageUnit;
  61.  
  62. //==============================================================================
  63. // Function prototype
  64. //==============================================================================
  65. void GetFinderInfo(Environment* ev, ODStorageUnit* su, PlatformFile* file);
  66. void GetIconFamilyFromFile(Environment* ev, ODStorageUnit* su, PlatformFile* file);
  67.  
  68. //==============================================================================
  69. // ODDragItem
  70. //==============================================================================
  71. class ODDragItem
  72. {
  73. public:
  74.  
  75.     ODDragItem(ODStorageSystem *storage, ODBoolean IsForeignDataSU);
  76.     ODVMethod    ~ODDragItem() {}
  77.     ODNVMethod    void Initialize(Environment* ev) {}
  78.     ODVMethod    void Open(Environment* ev);
  79.     ODVMethod    void Close(Environment* ev);
  80.     ODVMethod    ODDraft* GetDraft(void) { return fDraft; }
  81.     
  82.     ODStorageUnit*    fSU;
  83.  
  84. protected:
  85.  
  86.     ODStorageSystem*        fStorageSystem;
  87.     ODContainer*            fContainer;
  88.     ODDocument*                fDocument;
  89.     ODDraft*                fDraft;
  90. };
  91.  
  92. class ODMemDragItem : public ODDragItem
  93. {
  94. public:
  95.  
  96.     ODMemDragItem(ODStorageSystem *storage, ODBoolean IsForeignDataSU)
  97.         : ODDragItem(storage, IsForeignDataSU) {};
  98.     ODMemDragItem(ODStorageSystem *storage, ODHandle containerH, ODBoolean IsForeignDataSU);
  99.     
  100.     ~ODMemDragItem();
  101.         void Initialize(Environment* ev);
  102.         void Open(Environment* ev);
  103.         void Close(Environment* ev);
  104.         ODHandle GetContainerHandle( void ) { return fContainerHandle; }
  105.     
  106.     ODHandle                  fContainerHandle;
  107. };
  108.  
  109. class ODFileDragItem : public ODDragItem
  110. {
  111. public:
  112.  
  113.         ODFileDragItem(ODStorageSystem *storage, ODBoolean IsForeignDataSU)
  114.             : ODDragItem(storage, IsForeignDataSU) {};
  115.            ~ODFileDragItem();
  116.         void Initialize(Environment* ev, ODContainerID* file);
  117. };
  118.  
  119.  
  120. //==============================================================================
  121. // ODDragLink
  122. //==============================================================================
  123. class ODDragLink : public Link
  124. {
  125.     public:
  126.         ODDragLink(ODDragItem *theItem, ODBoolean cleanup);
  127.         ~ODDragLink();
  128.        
  129.         ODDragItem *fItem;
  130.         ODBoolean   fCleanup;
  131. };
  132.  
  133. #endif    // _DRAGPRIV_
  134.